package com.example.diarymanger.bean;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;

@TableName("user")
public class UserBean {

    @TableId(type = IdType.AUTO) // 自动递增主键
    private Integer id;

    @TableField("uid")
    private Integer uid;

    @TableField("name")
    private String name;

    @TableField("username")
    private String username;

    @TableField("password")
    private String password;

    @TableField("phone")
    private String phone;

    @TableField("sex")
    private String sex;

    @TableField("age")
    private Integer age;

    @TableField("birthday")
    private Date birthday;

    @TableField("status")
    private Integer status;

    @TableField("identity")
    private Integer identity;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @TableField("image_link")
    private String imageLink;


    public UserBean(Integer id, Integer uid, String name, String username, String password, String phone, String sex, Integer age, Date birthday, Integer status, Integer identity, Date createTime, String imageLink) {
        this.id = id;
        this.uid = uid;
        this.name = name;
        this.username = username;
        this.password = password;
        this.phone = phone;
        this.sex = sex;
        this.age = age;
        this.birthday = birthday;
        this.status = status;
        this.identity = identity;
        this.createTime = createTime;
        this.imageLink = imageLink;
    }

    public UserBean() {
    }

    public Integer getId() {
        return this.id;
    }

    public Integer getUid() {
        return this.uid;
    }

    public String getName() {
        return this.name;
    }

    public String getUsername() {
        return this.username;
    }

    public String getPassword() {
        return this.password;
    }

    public String getPhone() {
        return this.phone;
    }

    public String getSex() {
        return this.sex;
    }

    public Integer getAge() {
        return this.age;
    }

    public Date getBirthday() {
        return this.birthday;
    }

    public Integer getStatus() {
        return this.status;
    }

    public Integer getIdentity() {
        return this.identity;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public String getImageLink() {
        return this.imageLink;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public void setIdentity(Integer identity) {
        this.identity = identity;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setImageLink(String imageLink) {
        this.imageLink = imageLink;
    }

    public boolean equals(final Object o) {
        if (o == this) return true;
        if (!(o instanceof UserBean)) return false;
        final UserBean other = (UserBean) o;
        if (!other.canEqual((Object) this)) return false;
        final Object this$id = this.getId();
        final Object other$id = other.getId();
        if (this$id == null ? other$id != null : !this$id.equals(other$id)) return false;
        final Object this$uid = this.getUid();
        final Object other$uid = other.getUid();
        if (this$uid == null ? other$uid != null : !this$uid.equals(other$uid)) return false;
        final Object this$name = this.getName();
        final Object other$name = other.getName();
        if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false;
        final Object this$username = this.getUsername();
        final Object other$username = other.getUsername();
        if (this$username == null ? other$username != null : !this$username.equals(other$username)) return false;
        final Object this$password = this.getPassword();
        final Object other$password = other.getPassword();
        if (this$password == null ? other$password != null : !this$password.equals(other$password)) return false;
        final Object this$phone = this.getPhone();
        final Object other$phone = other.getPhone();
        if (this$phone == null ? other$phone != null : !this$phone.equals(other$phone)) return false;
        final Object this$sex = this.getSex();
        final Object other$sex = other.getSex();
        if (this$sex == null ? other$sex != null : !this$sex.equals(other$sex)) return false;
        final Object this$age = this.getAge();
        final Object other$age = other.getAge();
        if (this$age == null ? other$age != null : !this$age.equals(other$age)) return false;
        final Object this$birthday = this.getBirthday();
        final Object other$birthday = other.getBirthday();
        if (this$birthday == null ? other$birthday != null : !this$birthday.equals(other$birthday)) return false;
        final Object this$status = this.getStatus();
        final Object other$status = other.getStatus();
        if (this$status == null ? other$status != null : !this$status.equals(other$status)) return false;
        final Object this$identity = this.getIdentity();
        final Object other$identity = other.getIdentity();
        if (this$identity == null ? other$identity != null : !this$identity.equals(other$identity)) return false;
        final Object this$createTime = this.getCreateTime();
        final Object other$createTime = other.getCreateTime();
        if (this$createTime == null ? other$createTime != null : !this$createTime.equals(other$createTime))
            return false;
        final Object this$imageLink = this.getImageLink();
        final Object other$imageLink = other.getImageLink();
        if (this$imageLink == null ? other$imageLink != null : !this$imageLink.equals(other$imageLink)) return false;
        return true;
    }

    protected boolean canEqual(final Object other) {
        return other instanceof UserBean;
    }

    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $id = this.getId();
        result = result * PRIME + ($id == null ? 43 : $id.hashCode());
        final Object $uid = this.getUid();
        result = result * PRIME + ($uid == null ? 43 : $uid.hashCode());
        final Object $name = this.getName();
        result = result * PRIME + ($name == null ? 43 : $name.hashCode());
        final Object $username = this.getUsername();
        result = result * PRIME + ($username == null ? 43 : $username.hashCode());
        final Object $password = this.getPassword();
        result = result * PRIME + ($password == null ? 43 : $password.hashCode());
        final Object $phone = this.getPhone();
        result = result * PRIME + ($phone == null ? 43 : $phone.hashCode());
        final Object $sex = this.getSex();
        result = result * PRIME + ($sex == null ? 43 : $sex.hashCode());
        final Object $age = this.getAge();
        result = result * PRIME + ($age == null ? 43 : $age.hashCode());
        final Object $birthday = this.getBirthday();
        result = result * PRIME + ($birthday == null ? 43 : $birthday.hashCode());
        final Object $status = this.getStatus();
        result = result * PRIME + ($status == null ? 43 : $status.hashCode());
        final Object $identity = this.getIdentity();
        result = result * PRIME + ($identity == null ? 43 : $identity.hashCode());
        final Object $createTime = this.getCreateTime();
        result = result * PRIME + ($createTime == null ? 43 : $createTime.hashCode());
        final Object $imageLink = this.getImageLink();
        result = result * PRIME + ($imageLink == null ? 43 : $imageLink.hashCode());
        return result;
    }

    public String toString() {
        return "UserBean(id=" + this.getId() + ", uid=" + this.getUid() + ", name=" + this.getName() + ", username=" + this.getUsername() + ", password=" + this.getPassword() + ", phone=" + this.getPhone() + ", sex=" + this.getSex() + ", age=" + this.getAge() + ", birthday=" + this.getBirthday() + ", status=" + this.getStatus() + ", identity=" + this.getIdentity() + ", createTime=" + this.getCreateTime() + ", imageLink=" + this.getImageLink() + ")";
    }
}
